package pl.edu.agh.strategies;

import static pl.edu.agh.Values.maxPeople;

import java.util.List;

import pl.edu.agh.Values;

public class WeekAverage extends AbstractStrategy{
	@Override
	public boolean decide(List<Integer> history) {
		int startUpTime = 30;
		if(history.size() < startUpTime)
			return (new Random()).decide(history);
		int weekSum = 0;
		for(int i = 0; i < 7; i++){
			weekSum += history.get(history.size() - (i+1));
		}
		return rateAndSave(weekSum/7);
	}
}
